package com.lgl.scsheader.sameCityChart.controller;

import com.lgl.scsheader.base.controller.BaseController;
import com.lgl.scsheader.sameCityChart.service.UserOrderChartService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 用户订单统计图表
 */

@RestController
@RequestMapping(value="/userOrderChart")
public class UserOrderChartController extends BaseController{
	@Resource(name="userOrderChartService")
	private UserOrderChartService userOrderChartService;

    //获取每个月有多少用户下单/抢单
    @RequestMapping(value = "/listMonthUserTotal")
    public Object listMonthUserTotal(){
        return userOrderChartService.listMonthUserTotal(getPageData());
    }
    //获取从未下过单、未抢过单、抢过单未下过单、下过单未抢过单、既下单又抢单、下过单、抢过单等情况下的用户量
    @RequestMapping(value = "/listIssueRobUserTotal")
    public Object listIssueRobUserTotal(){
        return userOrderChartService.listIssueRobUserTotal(getPageData());
    }
    //获取2年内发布和抢单最多的6个用户
    @RequestMapping(value = "/listIssueRobMostUser")
    public Object listIssueRobMostUser(){
        return userOrderChartService.listIssueRobMostUser(getPageData());
    }
    //获取2年内周几发布和抢单用户数
    @RequestMapping(value = "/listIssueRobWeekUser")
    public Object listIssueRobWeekUser(){
        return userOrderChartService.listIssueRobWeekUser(getPageData());
    }
    //获取每个月下单/抢单男女用户的数量
    @RequestMapping(value = "/listMonthUserSexTotal")
    public Object listMonthUserSexTotal(){
        return userOrderChartService.listMonthUserSexTotal(getPageData());
    }
    //获取下单/抢单用户70前、70后、80后、90后、00后的数量
    @RequestMapping(value = "/listIssueRobAgeSection")
    public Object listIssueRobAgeSection(){
        return userOrderChartService.listIssueRobAgeSection(getPageData());
    }
}